package cn.i7baozh.starter.service.service.impl;

import cn.i7baozh.starter.service.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Service;

/**
 * @author : baoqi.zhang
 * @date :   2022/5/10 11:57
 */
@Slf4j
@RefreshScope
@Service
public class TestServiceImpl implements TestService {

    @Value("${server.port}")
    private String serverPort;

    @Value("${config.value:}")
    private String configValue;

    @Override
    public String sayHello(String name) {
        return "来自服务器[" + serverPort + "]的问候:" + name + "，你好, 接收到的配置信息为: " + configValue;
    }
}
